﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="finance.aspx.vb" Inherits="admin_finance" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>SmartTaxi управление - финансы

    </title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <div class="row">

        <h3 style="border-bottom: 1px solid #c6c6c6">Финансы</h3>

        <div class="row" style="padding-left: 35px; padding-right: 35px;">

            <div class="col-sm-12">

                <table>

                    <tr valign="middle">

                        <td style="padding-right:15px;" valign="middle">Номер таксиста</td>

                        <td style="padding-right:15px;" valign="middle">
                            <asp:TextBox ID="taxist_phone" runat="server"></asp:TextBox></td>

                        <td colspan="3">
                            <asp:Button ID="Button1" runat="server" Text="Показать" />
                        </td>
                    <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td style="padding-right:15px;" valign="middle">Номер таксиста</td>
                         <td style="padding-right:15px;" valign="middle">
                            <asp:TextBox ID="transfer_number" runat="server"></asp:TextBox></td>
                         <td style="padding-right:15px;" valign="middle">Сумма пополнения / списания</td>
                        <td style="padding-right:15px;" valign="middle">
                            <asp:TextBox ID="transfer_money" runat="server"></asp:TextBox></td>

                        <td>
                            <asp:Button ID="Button2" runat="server" Text="Выполнить" />
                        </td>

                    </tr>


                </table>

                <br />
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="transfer_id" DataSourceID="SqlDataSource1" Width="100%">
                    <Columns>
                        <asp:BoundField DataField="transfer_id" HeaderText="Идентефикатор" ReadOnly="True" SortExpression="transfer_id" />
                        <asp:BoundField DataField="transfer_code" HeaderText="Код / Источник" SortExpression="transfer_code" />
                        <asp:BoundField DataField="transfer_date" HeaderText="Дата" SortExpression="transfer_date" />
                        <asp:BoundField DataField="transfer_amount" HeaderText="Сумма" SortExpression="transfer_amount" />
                        <asp:BoundField DataField="txt_id" HeaderText="ОСМП код" SortExpression="txt_id" />
                       
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:1gb_smarttaxiConnectionString %>" SelectCommand="SELECT [transfer_id], [transfer_code], [transfer_date], [transfer_amount], [txt_id], [transfer_sdate] FROM [transfers] WHERE ([transfers].[client_id] = (SELECT taxist.taxi_id FROM taxist WHERE taxi_phone = @client_id)) ORDER BY transfer_date DESC">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="taxist_phone" Name="client_id" PropertyName="Text" Type="Object" />
                    </SelectParameters>
                </asp:SqlDataSource>

            </div>
        </div>
    </div>

</asp:Content>

